package com.liuhouse1.filter;

import javax.servlet.*;
import java.io.IOException;

/**
 * 创建过滤器
 * FilterRegistrationBean用来注册Filter对象
 * 实现步骤
 * 1.创建Filter对象
 */
public class MyFilter implements Filter {
    @Override
    public void doFilter(ServletRequest servletRequest,
                         ServletResponse servletResponse,
                         FilterChain filterChain) throws IOException, ServletException {
        System.out.println("Servlet....Filter...");
        //放行
        filterChain.doFilter(servletRequest , servletResponse);
    }
}
